<template>
  父组件
  <h3>车名：{{ name }}</h3>
  <h3>价格：{{ price }}</h3>
  <hr>
子组件<br>
<child></child>

</template>

<script>
import child from './child.vue'
import { reactive,toRefs, provide } from "vue";
export default {
  name: "App",
components:{child},
  setup() {
  
    let car =reactive({
      name:'宝马',
      price:10000000
    })
    // 提供的 别名  变量
    provide('car',car)
    return { ...toRefs(car) };
  },
};
</script>

<style>
</style>
